import Login from './views/Login.vue'
import NotFound from './views/404.vue'
// import LeftMenu from './views/LeftMenu.vue'

/*import UserHome from './views/user/Home.vue'
import UserMain from './views/user/Main.vue'*/
// import usermain from './views/user/usermain.vue'

import Home from './views/admin/Home.vue'
import Main from './views/admin/Main.vue'
import Meeting_room from './views/admin/Meeting_room.vue'
import Equipment_manage from './views/admin/Equipment_manage.vue'
import Personnel_management from './views/admin/Personnel_management.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
/*    {
        path: '/admin/main',
        component: LeftMenu,
        name: '首页',
        iconCls: 'fa fa-home',
        meta: {
            role: '管理员'
        }
    },
    {
        path: '/admin/Meeting_room',
        component: LeftMenu,
        name: '会议室管理',
        meta: {
            role: '管理员'
        }
    },
    {
        path: '/admin/Equipment_manage',
        component: LeftMenu,
        name: '设备管理',
        meta: {
            role: '管理员'
        }
    },
    {
        path: '/admin/Personnel_management',
        component: LeftMenu,
        name: '人员管理',
        meta: {
            role: '管理员'
        }
    },*/
    /* 后台管理首页 main */
    {

        path: '/',
        component: Home,
        name: '',
        leaf: false,//只有一个节点
        meta: {
            role: '管理员'
        },
       children: [
            {
                path: '/admin/main',
                component: Main,
                name: '首页',
                iconCls: 'fa fa-home'
            },
            {
                path: '/admin/Meeting_room',
                component: Meeting_room,
                name: '会议室管理'
            },
            {
                path: '/admin/Equipment_manage',
                component: Equipment_manage,
                name: '设备管理'
            },
            { path: '/admin/Personnel_management', component: Personnel_management, name: '人员管理' },

        ]
    },

    // /* 会议室管理页面 */
    // {
    //     path: '/',
    //     component: Home,
    //     name: '',
    //     iconCls: 'fa fa-comments-o',
    //     leaf: true,//只有一个节点
    //     children: [
    //         { path: '/admin/Meeting_room', component: Meeting_room, name: '会议室管理' }
    //     ]
    // },
    //
    // /* 设备管理页面 */
    // {
    //     path: '/',
    //     component: Home,
    //     name: '',
    //     iconCls: 'fa fa-cogs',
    //     leaf: true,//只有一个节点
    //     children: [
    //         { path: '/admin/Equipment_manage', component: Equipment_manage, name: '设备管理' }
    //     ]
    // },
    //
    // /* 人员管理页面 */
    // {
    //     path: '/',
    //     component: Home,
    //     name: '',
    //     iconCls: 'fa fa-users',
    //     leaf: true,//只有一个节点
    //     children: [
    //         { path: '/admin/Personnel_management', component: Personnel_management, name: '人员管理' }
    //     ]
    // },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;